package com.dcxs.shop.module.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dcxs.shop.module.order.dto.Logistics;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author zzh
 * @since 2020-03-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class JsProductOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private Integer  id;

    /**
     * 订单号
     */
    private String orderNumber;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice;

    //人民币付的钱
    private BigDecimal totalPayPrice;

    /**
     * 订单的状态
     */
    private Integer state;

    /**
     * 收货人
     */
    private String name;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 省
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String area;

    /**
     * 详细地址
     */
    private String address;

    private Integer isUse;

    private BigDecimal totalPoints;

    private Integer usePointState;

    private BigDecimal usePoints;

    private Integer payWay;

    private Integer cashPayType;

    private String cashPayName;

    private String remark;

    private Integer usrId;

    private BigDecimal truePay;

    private BigDecimal truePayPoints;

    @TableField(exist = false)
    private List<JsProductOrderDetail> productOrderDetails;

    private LocalDateTime createTime;

    private String cashTradeNo;

    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payDatetime;

    private Date payDate;

    private Date insertDate;

    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime insertDatetime;

    private BigDecimal cashPayFee;

    @TableField(exist = false)
    private List<Logistics.LastResultBean> wuliu;

    private String usrPhone;

    private Date expressSignDatetime;

    private String queryId;

    private Date refundDatetime;

    private BigDecimal totalShippingPay;



}
